<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>关键问题 - 1 - 修改状态</title>
  </head>

  <body>
    <script>
      //promise 状态只能修改一次
      let p = new Promise((resolve, reject) => {
        //改为成功
        resolve('OK')
        //失败
        reject('Error');
        //抛出错误
        // throw '有点问题'
      });
      console.log(p);
    </script>
  </body>
</html>
